﻿using System.Xml.Serialization;
using System.Collections.Generic;
using System;
namespace WeiBeeCommon.DataTypes
{
    [XmlRoot("status")]
    public class SinaStatus
    {
        public string created_at;
        public string id;
        public string text;
        [XmlElement("source")]
        public Source source;
        public bool favorited;
        public bool truncated;
        public Geo geo;
        public string in_reply_to_status_id;
        public string in_reply_to_user_id;
        public string in_reply_to_screen_name;
        public string thumbnail_pic;
        public string bmiddle_pic;
        public string original_pic;
        public string mid;
        public SinaUser user;
    }
   [XmlRoot("comment")]
    public class Comment
    {
        public string created_at;
        public string id;
        public string text;
        public Source source;
        public string mid;
        public SinaUser user;
        public SinaStatus status;
       // To do: annotations!
    }
    public class Source
    {
        [XmlElement("a")]
        public SourceUrl a;
    }
    public class SourceUrl
    {
        [XmlAttribute("href")]
        public string href;
        [XmlText]
        public string desc;
    }
    public class Geo
    {
        [XmlElement(@"georss:point")] // To be handle!
        public GeoRss georss;
    }
    public class GeoRss
    {
        [XmlText]
        public string text;
    }

    public class count
    {
        [XmlElement("id")]
        public string id;
        [XmlElement("comments")]
        public int comments;
        [XmlElement("rt")]
        public int rt;
    }

    public class RateLimit
    {
        [XmlElement("remaining-hits")]
        public int remaining;
        [XmlElement("hourly-limit")]
        public int hourly;
        [XmlElement("reset-time-in-seconds")]
        public int resetseconds;
        [XmlElement("reset-time")]
        public string resettime;
    }
}
